<template>
  <div class="baseDiv">
    <el-card class="box-card">
      <div slot="header" align="center">
        <h2>回答的问卷</h2>
      </div>
      <div style="width:810px;margin: 0 auto">
        <el-table
            :data="replayData"

        >
          <el-table-column label="回答的问卷" type="index" align="center" width="400">
            <template scope="scope">
              {{ scope.row.question.theme }}
            </template>
          </el-table-column>
          <el-table-column label="回答时间" type="index" align="center" width="400">
            <template scope="scope">
              {{ scope.row.createTime.substring(0, 10) }}
            </template>
          </el-table-column>
        </el-table>
      </div>
    </el-card>
  </div>
</template>

<script>
export default {
  name: "personReply",
  data() {
    return {
      replayData: [{}]
    }
  },
  methods: {
    getUserReplay() {
      this.$http.post('/user/findUserReply/' + this.$store.state.userId).then(resp => {
        if (resp.flag) {
          this.replayData = resp.data;


        } else {
          this.$message.success("信息查询失败");
        }
      })
    }
  },
  created() {
    this.getUserReplay();
  }

}
</script>

<style scoped>
.baseDiv {
  width: 80%;
  height: 100%;
  transform: translateX(20%);
}

.box-card {
  margin-top: 2%;
  width: 80%;
}

</style>